﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BLL
{
    public class Favorite
    {
        private static readonly IDAL.IFavorite dalfav = DALFactory.DataAccess.CreateFavorite();
        public static IList<Model.Favorite> GetTopFavorite(int uid) {
            
            return dalfav.GetTopFavorite(uid);
        }

        public static IList<Model.Favorite> GetChildFavorite(int pid)
        {
            return dalfav.GetChildFavorite(pid);
        }

        public static bool AddFavorite(Model.Favorite modfav)
        {
            return dalfav.AddFavorite(modfav) == 1 ? true : false;
        }
    }
}
